function CommonPaeseUrl(url) {
    let params = {}
    let index = url.indexOf('?')
    let new_url = url.substring(index + 1)
    new_url.split('&').forEach(n => {
        const values = n.split('=')
        params[values[0]] = values[1]
    })
    return params
}
console.log(CommonPaeseUrl('https://www.baidu.com?name=kang&age=27'));